Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
The new Banner module allows for much easier creation, deployment, tear-down of promotional banners on the Flashbots website. Banners can be created by just editing a new configuration file -
Banner.config.tsx
- to set the content, basic appearance, and display period. This greatly simplifies the process of adding promotional content to the page, compared to all the manual dev work required before.The module gives you the option to set:
These allow you to create any kind of banner, from very basic notifications to fully-styled promotional banners.
How to create a new banner
To add a new banner all you need to do is edit the properties in
components/banner/Banner.config.tsx
and set them to your desired values. For simple banners with just a couple of colors - for copy and background - you can use the properties there. But if the banner requires more sophisticated styling you can override the color options by settingcustomCSS: true
and adding your CSS rules tocomponents/banner/Banner.custom.module.scss
.There are detailed explanations for each property in the configuration file itself.
How it works
The new Banner module is loaded by the
Navbar
module, injecting a banner right above the navigation menu:flashbots-docs/src/theme/Navbar/index.js
Lines 8 to 12 in 69cf4a6
All of relevant configuration files (for banner options and custom CSS) live inside the
components/banner
folder to make it easier for users to find and edit them if needed.